\hypertarget{group__telnet__server}{\section{Telnet Server}
\label{group__telnet__server}\index{Telnet Server@{Telnet Server}}
}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct_telnet_opts__t}{Telnet\-Opts\-\_\-t}
\begin{DoxyCompactList}\small\item\em Telnet options state structure. A structure that contains the state of the options supported by the telnet server, along with the possible flags. \end{DoxyCompactList}\item 
struct \hyperlink{struct_telnet_server__t}{Telnet\-Server\-\_\-t}
\begin{DoxyCompactList}\small\item\em Data structure to hold the state of the Telnet server. Contains all of the necessary state variables to impliment the Telnet server. Direct manipulation of these members is not recommended as it may leave the server in an inconsistent state. Instead, helper methods are provided which will ensure that all necessary operations occur as a result of any change. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__telnet__server_gae9088b6c383afeff8d58098f141afbd3}{\#define \hyperlink{group__telnet__server_gae9088b6c383afeff8d58098f141afbd3}{T\-E\-L\-N\-E\-T\-\_\-\-B\-U\-F\-F\-E\-R\-\_\-\-L\-E\-N\-G\-T\-H}~2056}\label{group__telnet__server_gae9088b6c383afeff8d58098f141afbd3}

\begin{DoxyCompactList}\small\item\em The length of the buffer to use for Telnet data. \end{DoxyCompactList}\item 
\hypertarget{group__telnet__server_ga0e9795e3bb758850785e6ebc676ab01b}{\#define \hyperlink{group__telnet__server_ga0e9795e3bb758850785e6ebc676ab01b}{N\-O\-T\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D}~0}\label{group__telnet__server_ga0e9795e3bb758850785e6ebc676ab01b}

\begin{DoxyCompactList}\small\item\em The Telnet server is not connected to a client. \end{DoxyCompactList}\item 
\hypertarget{group__telnet__server_gaf6202935c026af12978d46a765dafb90}{\#define \hyperlink{group__telnet__server_gaf6202935c026af12978d46a765dafb90}{C\-O\-N\-N\-E\-C\-T\-E\-D}~1}\label{group__telnet__server_gaf6202935c026af12978d46a765dafb90}

\begin{DoxyCompactList}\small\item\em The Telnet server is connected to a client. \end{DoxyCompactList}\item 
\#define \hyperlink{group__telnet__server_ga8b600918f84783490fd791ce773175ab}{T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C}~((char) 255)
\item 
\#define \hyperlink{group__telnet__server_ga9b82c3af8c3a14bc1f758d79a00e9ee9}{T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y}~((char) 0)
\item 
\hypertarget{group__telnet__server_ga87cde070c7f961821be5f38065c6a4a0}{\#define \hyperlink{group__telnet__server_ga87cde070c7f961821be5f38065c6a4a0}{O\-P\-T\-\_\-\-F\-L\-A\-G\-\_\-\-W\-I\-L\-L}~((uint8\-\_\-t) 1)}\label{group__telnet__server_ga87cde070c7f961821be5f38065c6a4a0}

\begin{DoxyCompactList}\small\item\em The bit in the uc\-Flags member of the t\-Telnet\-Opts that is set when the remote client has sent a W\-I\-L\-L request and the server has accepted it. \end{DoxyCompactList}\item 
\hypertarget{group__telnet__server_gaab89806cad0a31ec6d4cae073ffbebcb}{\#define \hyperlink{group__telnet__server_gaab89806cad0a31ec6d4cae073ffbebcb}{O\-P\-T\-\_\-\-F\-L\-A\-G\-\_\-\-D\-O}~((uint8\-\_\-t) 2)}\label{group__telnet__server_gaab89806cad0a31ec6d4cae073ffbebcb}

\begin{DoxyCompactList}\small\item\em The bit in the uc\-Flags member of t\-Telnet\-Opts that is set when the remote client has sent a D\-O request and the server has accepted it. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__telnet__server_ga6a34decdb77d8c9df8ead5420ea8d326}{Telnet\-State\-\_\-t} \{ \\*
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ae583c55c9f9a3aa9888e4ed771d6a9b6}{S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L}, 
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ac445fb392e1398d85894ed95c217535d}{S\-T\-A\-T\-E\-\_\-\-I\-A\-C}, 
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326aab00693e6446eb0b2dd86441e16fa7bd}{S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L}, 
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a1c98dcef9f1808d490980c9660d07356}{S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T}, 
\\*
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a690d160db6429d82862282d94e3b4c4f}{S\-T\-A\-T\-E\-\_\-\-D\-O}, 
\hyperlink{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a8efcfd07c99adc3da1f982af25bb6054}{S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T}
 \}
\begin{DoxyCompactList}\small\item\em Telnet parser state enumeration. The possible states of the telnet option parser. \end{DoxyCompactList}\item 
enum \hyperlink{group__telnet__server_gab6653d6c1bd1261ebfcb4d667f848716}{Telnet\-Status\-\_\-t} \{ \hyperlink{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a63347d81d258d4f3c53dca873fbe3b41}{T\-E\-L\-N\-E\-T\-\_\-\-O\-K}, 
\hyperlink{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716ade43926fa79e7274b5a207aa99dfbf80}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D}, 
\hyperlink{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a0ebd3cbc0fc21b74010e6faf772852e9}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D}, 
\hyperlink{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a01d38959911101e3354606780cf67a6d}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E}
 \}
\begin{DoxyCompactList}\small\item\em Telnet status enumeration. The possible success/error causes for the Telnet server's operation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__telnet__server_gab6653d6c1bd1261ebfcb4d667f848716}{Telnet\-Status\-\_\-t} \hyperlink{group__telnet__server_gae8002482499a83baab72c8714ef609d2}{Initialize\-Telnet\-Server} (void)
\begin{DoxyCompactList}\small\item\em Initialize a \hyperlink{struct_telnet_server__t}{Telnet\-Server\-\_\-t} struct with default values. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga26f786d2e47e4bb5f180d2740eebc957}{Telnet\-Close} (void)
\begin{DoxyCompactList}\small\item\em This function is called when the the T\-C\-P connection should be closed. \end{DoxyCompactList}\item 
\hyperlink{group__data__types_ga0ecf26b576b9a54eca656b9be7ba6a06}{bool} \hyperlink{group__telnet__server_ga6509e0047d80aea0570ec903a1e10887}{Telnet\-Is\-Connected} (void)
\begin{DoxyCompactList}\small\item\em Indicates if the Telnet server is occupied or not. \end{DoxyCompactList}\item 
err\-\_\-t \hyperlink{group__telnet__server_ga8946efc99077a959cb1cad3e059f9071}{Telnet\-Poll} (void $\ast$arg, struct tcp\-\_\-pcb $\ast$tpcb)
\begin{DoxyCompactList}\small\item\em Called when the lw\-I\-P T\-C\-P/\-I\-P stack needs to poll the server with/for data. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga93c1e298d9778f890b6df05b35072988}{Telnet\-Recv\-Buffer\-Write} (char character)
\begin{DoxyCompactList}\small\item\em Writes a character into the telnet receive buffer. \end{DoxyCompactList}\item 
char \hyperlink{group__telnet__server_gaff55b8914481cb32d621a855a69a5635}{Telnet\-Read} (void)
\begin{DoxyCompactList}\small\item\em Reads a character from the telnet interface. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_gaa2f418e9d287a2863fe1198e3c75f4ad}{Telnet\-Write} (const char character)
\begin{DoxyCompactList}\small\item\em Writes a character to the telnet interface. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga579198334cf97874ecc89e3b29351066}{Telnet\-Write\-String} (char $\ast$string)
\begin{DoxyCompactList}\small\item\em Writes a string to the telnet interface. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga8779bc1d2c7943063104c8624a877d8b}{Telnet\-Process\-Will} (char option)
\begin{DoxyCompactList}\small\item\em Handle a W\-I\-L\-L request for a telnet option. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_gac84ea97f4be2d0b62498cca6297d0ab7}{Telnet\-Process\-Wont} (char option)
\begin{DoxyCompactList}\small\item\em Handle a W\-O\-N\-T request for a telnet option. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_gabdf9478794e09f61ab850c78147a7c6f}{Telnet\-Process\-Do} (char option)
\begin{DoxyCompactList}\small\item\em Handle a D\-O request for a telnet option. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_gaf2500a4ad4bcbfd6ac4367f298e42f10}{Telnet\-Process\-Dont} (char option)
\begin{DoxyCompactList}\small\item\em Handle a D\-O\-N\-T request for a telnet option. \end{DoxyCompactList}\item 
\hypertarget{group__telnet__server_ga348f2b04116a013b6eabfa72c926a25f}{void \hyperlink{group__telnet__server_ga348f2b04116a013b6eabfa72c926a25f}{Telnet\-Process\-Character} (char character)}\label{group__telnet__server_ga348f2b04116a013b6eabfa72c926a25f}

\begin{DoxyCompactList}\small\item\em Process a character received from the telnet port. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga0660c325387baca6c54fe699ac048907}{Telnet\-Write\-Error\-Message} (char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print a message to the telnet connection formatted as an error. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga0afb5de5ce2d81cdc5322e0534bae1d8}{Telnet\-Write\-Status\-Message} (char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print a message to the telnet connection formatted as a status. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga7d350b6355ef213d4aa15e9b80c3d15e}{Telnet\-Write\-Debug\-Message} (char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print a message to the telnet connection formatted as a debug. \end{DoxyCompactList}\item 
void \hyperlink{group__telnet__server_ga7f3d87d181908e8353a67bbaf15fac50}{Telnet\-Write\-Command\-Data\-Message} (char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print a message to the telnet connection formatted as a command data message. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Macro Definition Documentation}
\hypertarget{group__telnet__server_ga8b600918f84783490fd791ce773175ab}{\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C@{T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C}}
\index{T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C@{T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C}!Telnet Server@{Telnet Server}}
\subsubsection[{T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\-E\-L\-N\-E\-T\-\_\-\-I\-A\-C~((char) 255)}}\label{group__telnet__server_ga8b600918f84783490fd791ce773175ab}
Telnet commands, as defined by R\-F\-C854. 

Definition at line 76 of file Telnet\-Server.\-h.

\hypertarget{group__telnet__server_ga9b82c3af8c3a14bc1f758d79a00e9ee9}{\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y@{T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y}}
\index{T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y@{T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y}!Telnet Server@{Telnet Server}}
\subsubsection[{T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\-E\-L\-N\-E\-T\-\_\-\-O\-P\-T\-\_\-\-B\-I\-N\-A\-R\-Y~((char) 0)}}\label{group__telnet__server_ga9b82c3af8c3a14bc1f758d79a00e9ee9}
Telnet options, as defined by R\-F\-C856-\/\-R\-F\-C861. 

Definition at line 97 of file Telnet\-Server.\-h.



\subsection{Enumeration Type Documentation}
\hypertarget{group__telnet__server_ga6a34decdb77d8c9df8ead5420ea8d326}{\index{Telnet Server@{Telnet Server}!Telnet\-State\-\_\-t@{Telnet\-State\-\_\-t}}
\index{Telnet\-State\-\_\-t@{Telnet\-State\-\_\-t}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-State\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Telnet\-State\-\_\-t}}}\label{group__telnet__server_ga6a34decdb77d8c9df8ead5420ea8d326}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L@{S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L@{S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ae583c55c9f9a3aa9888e4ed771d6a9b6}{S\-T\-A\-T\-E\-\_\-\-N\-O\-R\-M\-A\-L}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ae583c55c9f9a3aa9888e4ed771d6a9b6}
}]The telnet option parser is in its normal mode. Characters are passed as is until an I\-A\-C byte is received. \index{S\-T\-A\-T\-E\-\_\-\-I\-A\-C@{S\-T\-A\-T\-E\-\_\-\-I\-A\-C}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-I\-A\-C@{S\-T\-A\-T\-E\-\_\-\-I\-A\-C}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ac445fb392e1398d85894ed95c217535d}{S\-T\-A\-T\-E\-\_\-\-I\-A\-C}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326ac445fb392e1398d85894ed95c217535d}
}]The previous character received by the telnet option parser was an I\-A\-C byte. \index{S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L@{S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L@{S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326aab00693e6446eb0b2dd86441e16fa7bd}{S\-T\-A\-T\-E\-\_\-\-W\-I\-L\-L}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326aab00693e6446eb0b2dd86441e16fa7bd}
}]The previous character sequence received by the telnet option parser was I\-A\-C W\-I\-L\-L. \index{S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T@{S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T@{S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a1c98dcef9f1808d490980c9660d07356}{S\-T\-A\-T\-E\-\_\-\-W\-O\-N\-T}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a1c98dcef9f1808d490980c9660d07356}
}]The previous character sequence received by the telnet option parser was I\-A\-C W\-O\-N\-T. \index{S\-T\-A\-T\-E\-\_\-\-D\-O@{S\-T\-A\-T\-E\-\_\-\-D\-O}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-D\-O@{S\-T\-A\-T\-E\-\_\-\-D\-O}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a690d160db6429d82862282d94e3b4c4f}{S\-T\-A\-T\-E\-\_\-\-D\-O}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a690d160db6429d82862282d94e3b4c4f}
}]The previous character sequence received by the telnet option parser was was I\-A\-C D\-O. \index{S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T@{S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T@{S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T}}\item[{\em 
\hypertarget{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a8efcfd07c99adc3da1f982af25bb6054}{S\-T\-A\-T\-E\-\_\-\-D\-O\-N\-T}\label{group__telnet__server_gga6a34decdb77d8c9df8ead5420ea8d326a8efcfd07c99adc3da1f982af25bb6054}
}]The previous character sequence received by the telnet option parser was was I\-A\-C D\-O\-N\-T. \end{description}
\end{Desc}


Definition at line 132 of file Telnet\-Server.\-h.

\hypertarget{group__telnet__server_gab6653d6c1bd1261ebfcb4d667f848716}{\index{Telnet Server@{Telnet Server}!Telnet\-Status\-\_\-t@{Telnet\-Status\-\_\-t}}
\index{Telnet\-Status\-\_\-t@{Telnet\-Status\-\_\-t}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Status\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Telnet\-Status\-\_\-t}}}\label{group__telnet__server_gab6653d6c1bd1261ebfcb4d667f848716}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{T\-E\-L\-N\-E\-T\-\_\-\-O\-K@{T\-E\-L\-N\-E\-T\-\_\-\-O\-K}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-O\-K@{T\-E\-L\-N\-E\-T\-\_\-\-O\-K}}\item[{\em 
\hypertarget{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a63347d81d258d4f3c53dca873fbe3b41}{T\-E\-L\-N\-E\-T\-\_\-\-O\-K}\label{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a63347d81d258d4f3c53dca873fbe3b41}
}]Everything is normal with the telnet server. \index{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D}}\item[{\em 
\hypertarget{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716ade43926fa79e7274b5a207aa99dfbf80}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-C\-O\-N\-N\-E\-C\-T\-E\-D}\label{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716ade43926fa79e7274b5a207aa99dfbf80}
}]There was an error in connection with the telnet server. \index{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D}}\item[{\em 
\hypertarget{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a0ebd3cbc0fc21b74010e6faf772852e9}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-B\-I\-N\-D}\label{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a0ebd3cbc0fc21b74010e6faf772852e9}
}]There was an error allocating memory for the telnet server. There was an error binding a socket to a port for the telnet server. \index{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E}!Telnet Server@{Telnet Server}}\index{Telnet Server@{Telnet Server}!T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E@{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E}}\item[{\em 
\hypertarget{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a01d38959911101e3354606780cf67a6d}{T\-E\-L\-N\-E\-T\-\_\-\-E\-R\-R\-\_\-\-P\-C\-B\-C\-R\-E\-A\-T\-E}\label{group__telnet__server_ggab6653d6c1bd1261ebfcb4d667f848716a01d38959911101e3354606780cf67a6d}
}]There was an error creating a P\-C\-B structure for the telnet server. \end{description}
\end{Desc}


Definition at line 145 of file Telnet\-Server.\-h.



\subsection{Function Documentation}
\hypertarget{group__telnet__server_gae8002482499a83baab72c8714ef609d2}{\index{Telnet Server@{Telnet Server}!Initialize\-Telnet\-Server@{Initialize\-Telnet\-Server}}
\index{Initialize\-Telnet\-Server@{Initialize\-Telnet\-Server}!Telnet Server@{Telnet Server}}
\subsubsection[{Initialize\-Telnet\-Server}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Telnet\-Status\-\_\-t} Initialize\-Telnet\-Server (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gae8002482499a83baab72c8714ef609d2}
Initializes the provided \hyperlink{struct_telnet_server__t}{Telnet\-Server\-\_\-t} struct with default values and creates a T\-C\-P port for it.


\begin{DoxyParams}{Parameters}
{\em none} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 376 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga26f786d2e47e4bb5f180d2740eebc957}{\index{Telnet Server@{Telnet Server}!Telnet\-Close@{Telnet\-Close}}
\index{Telnet\-Close@{Telnet\-Close}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Close}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Close (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga26f786d2e47e4bb5f180d2740eebc957}
This function is called when the the T\-C\-P connection should be closed.


\begin{DoxyParams}{Parameters}
{\em none} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 427 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga6509e0047d80aea0570ec903a1e10887}{\index{Telnet Server@{Telnet Server}!Telnet\-Is\-Connected@{Telnet\-Is\-Connected}}
\index{Telnet\-Is\-Connected@{Telnet\-Is\-Connected}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Is\-Connected}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bool} Telnet\-Is\-Connected (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga6509e0047d80aea0570ec903a1e10887}
Returns the connection status of the Telnet server. Since this implementation supports only one client at a time, this method can be used to determine if an incoming request can be honored as well as allowing other parts of the program to adjust their behavior depending on if a client is connected.


\begin{DoxyParams}{Parameters}
{\em none} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em bool} & T\-R\-U\-E if the telnet server has an active connection. \\
\hline
\end{DoxyRetVals}


Definition at line 458 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga8946efc99077a959cb1cad3e059f9071}{\index{Telnet Server@{Telnet Server}!Telnet\-Poll@{Telnet\-Poll}}
\index{Telnet\-Poll@{Telnet\-Poll}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Poll}]{\setlength{\rightskip}{0pt plus 5cm}err\-\_\-t Telnet\-Poll (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{arg, }
\item[{struct tcp\-\_\-pcb $\ast$}]{tpcb}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga8946efc99077a959cb1cad3e059f9071}
Called by the lw\-I\-P stack when there is data to send/receive to/from the Telnet server.


\begin{DoxyParams}{Parameters}
{\em arg} & void$\ast$ to argument passed to callback by lw\-I\-P stack. \\
\hline
{\em tpcb} & tcp\-\_\-pcb$\ast$ To the tcp\-\_\-pcb struct for the current tcp connection. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em err\-\_\-t} & The error/status code. \\
\hline
\end{DoxyRetVals}


Definition at line 469 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_gabdf9478794e09f61ab850c78147a7c6f}{\index{Telnet Server@{Telnet Server}!Telnet\-Process\-Do@{Telnet\-Process\-Do}}
\index{Telnet\-Process\-Do@{Telnet\-Process\-Do}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Process\-Do}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Process\-Do (
\begin{DoxyParamCaption}
\item[{char}]{option}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gabdf9478794e09f61ab850c78147a7c6f}
This function will handle a D\-O request for a telnet option. If it is an option that is known by the telnet server, a W\-I\-L\-L response will be generated if the option is not already enabled. For unknown options, a W\-O\-N\-T response will always be generated.

The response (if any) is written into the telnet transmit buffer.


\begin{DoxyParams}{Parameters}
{\em option} & char Option for the D\-O command. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
none 
\end{DoxyReturn}


Definition at line 711 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_gaf2500a4ad4bcbfd6ac4367f298e42f10}{\index{Telnet Server@{Telnet Server}!Telnet\-Process\-Dont@{Telnet\-Process\-Dont}}
\index{Telnet\-Process\-Dont@{Telnet\-Process\-Dont}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Process\-Dont}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Process\-Dont (
\begin{DoxyParamCaption}
\item[{char}]{option}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gaf2500a4ad4bcbfd6ac4367f298e42f10}
This funciton will handle a D\-O\-N\-T request for a telnet option. If it is an option that is known by the telnet server, a W\-O\-N\-T response will be generated if the option is not already disabled. For unknown options, a W\-O\-N\-T resopnse will always be generated.

The response (if any) is written into the telnet transmit buffer.


\begin{DoxyParams}{Parameters}
{\em option} & char Option for the D\-O\-N\-T command. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
none 
\end{DoxyReturn}


Definition at line 753 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga8779bc1d2c7943063104c8624a877d8b}{\index{Telnet Server@{Telnet Server}!Telnet\-Process\-Will@{Telnet\-Process\-Will}}
\index{Telnet\-Process\-Will@{Telnet\-Process\-Will}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Process\-Will}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Process\-Will (
\begin{DoxyParamCaption}
\item[{char}]{option}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga8779bc1d2c7943063104c8624a877d8b}
This function will handle a W\-I\-L\-L request for a telnet option. If it is an option that is known by the telnet server, a D\-O response will be generated if the option is not already enabled. For unknown options, a D\-O\-N\-T response will always be generated.

The response (if any) is written into the telnet transmit buffer.


\begin{DoxyParams}{Parameters}
{\em option} & char Option for the W\-I\-L\-L command. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 626 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_gac84ea97f4be2d0b62498cca6297d0ab7}{\index{Telnet Server@{Telnet Server}!Telnet\-Process\-Wont@{Telnet\-Process\-Wont}}
\index{Telnet\-Process\-Wont@{Telnet\-Process\-Wont}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Process\-Wont}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Process\-Wont (
\begin{DoxyParamCaption}
\item[{char}]{option}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gac84ea97f4be2d0b62498cca6297d0ab7}
This function will handle a W\-O\-N\-T request for a telnet option. If it is an option that is known by the telnet server, a D\-O\-N\-T response will be generated if the option is not already disabled. For unknown options, a D\-O\-N\-T response will always be generated.

The response (if any) is written into the telnet transmit buffer.


\begin{DoxyParams}{Parameters}
{\em server} & Pointer to the server to process. \\
\hline
{\em option} & char Option for the W\-O\-N\-T command. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 669 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_gaff55b8914481cb32d621a855a69a5635}{\index{Telnet Server@{Telnet Server}!Telnet\-Read@{Telnet\-Read}}
\index{Telnet\-Read@{Telnet\-Read}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Read}]{\setlength{\rightskip}{0pt plus 5cm}char Telnet\-Read (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gaff55b8914481cb32d621a855a69a5635}
Reads a character from the telnet interface.


\begin{DoxyParams}{Parameters}
{\em none} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em char} & The character read from the telnet interface. \\
\hline
\end{DoxyRetVals}


Definition at line 561 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga93c1e298d9778f890b6df05b35072988}{\index{Telnet Server@{Telnet Server}!Telnet\-Recv\-Buffer\-Write@{Telnet\-Recv\-Buffer\-Write}}
\index{Telnet\-Recv\-Buffer\-Write@{Telnet\-Recv\-Buffer\-Write}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Recv\-Buffer\-Write}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Recv\-Buffer\-Write (
\begin{DoxyParamCaption}
\item[{char}]{character}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga93c1e298d9778f890b6df05b35072988}
Writes a character into the telnet receive buffer.


\begin{DoxyParams}{Parameters}
{\em character} & char The character to write. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 516 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_gaa2f418e9d287a2863fe1198e3c75f4ad}{\index{Telnet Server@{Telnet Server}!Telnet\-Write@{Telnet\-Write}}
\index{Telnet\-Write@{Telnet\-Write}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write (
\begin{DoxyParamCaption}
\item[{const char}]{character}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_gaa2f418e9d287a2863fe1198e3c75f4ad}
Writes a character to the telnet interface.


\begin{DoxyParams}{Parameters}
{\em character} & const char The character to write to the interface. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 582 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga7f3d87d181908e8353a67bbaf15fac50}{\index{Telnet Server@{Telnet Server}!Telnet\-Write\-Command\-Data\-Message@{Telnet\-Write\-Command\-Data\-Message}}
\index{Telnet\-Write\-Command\-Data\-Message@{Telnet\-Write\-Command\-Data\-Message}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write\-Command\-Data\-Message}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write\-Command\-Data\-Message (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{message}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga7f3d87d181908e8353a67bbaf15fac50}
Print a message to the telnet connection formatted as a command data.


\begin{DoxyParams}{Parameters}
{\em message} & char$\ast$ Pointer to the string to send \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 1010 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga7d350b6355ef213d4aa15e9b80c3d15e}{\index{Telnet Server@{Telnet Server}!Telnet\-Write\-Debug\-Message@{Telnet\-Write\-Debug\-Message}}
\index{Telnet\-Write\-Debug\-Message@{Telnet\-Write\-Debug\-Message}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write\-Debug\-Message}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write\-Debug\-Message (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{message}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga7d350b6355ef213d4aa15e9b80c3d15e}
Print a message to the telnet connection formatted as a debug.


\begin{DoxyParams}{Parameters}
{\em message} & char$\ast$ Pointer to the string to send \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 987 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga0660c325387baca6c54fe699ac048907}{\index{Telnet Server@{Telnet Server}!Telnet\-Write\-Error\-Message@{Telnet\-Write\-Error\-Message}}
\index{Telnet\-Write\-Error\-Message@{Telnet\-Write\-Error\-Message}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write\-Error\-Message}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write\-Error\-Message (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{message}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga0660c325387baca6c54fe699ac048907}
Print a message to the telnet connection formatted as an error.


\begin{DoxyParams}{Parameters}
{\em message} & char$\ast$ Pointer to the string to send \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 943 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga0afb5de5ce2d81cdc5322e0534bae1d8}{\index{Telnet Server@{Telnet Server}!Telnet\-Write\-Status\-Message@{Telnet\-Write\-Status\-Message}}
\index{Telnet\-Write\-Status\-Message@{Telnet\-Write\-Status\-Message}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write\-Status\-Message}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write\-Status\-Message (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{message}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga0afb5de5ce2d81cdc5322e0534bae1d8}
Print a message to the telnet connection formatted as a status.


\begin{DoxyParams}{Parameters}
{\em message} & char$\ast$ Pointer to the string to send \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 964 of file Telnet\-Server.\-c.

\hypertarget{group__telnet__server_ga579198334cf97874ecc89e3b29351066}{\index{Telnet Server@{Telnet Server}!Telnet\-Write\-String@{Telnet\-Write\-String}}
\index{Telnet\-Write\-String@{Telnet\-Write\-String}!Telnet Server@{Telnet Server}}
\subsubsection[{Telnet\-Write\-String}]{\setlength{\rightskip}{0pt plus 5cm}void Telnet\-Write\-String (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{string}
\end{DoxyParamCaption}
)}}\label{group__telnet__server_ga579198334cf97874ecc89e3b29351066}
Writes a string to the specified Telnet server. Disables Ethernet interrupts during this process in order to prevent an intervening interrupt from corrupting the output buffer.


\begin{DoxyParams}{Parameters}
{\em string} & char$\ast$ Pointer to a C-\/\-String to write to the interface. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em none} & \\
\hline
\end{DoxyRetVals}


Definition at line 604 of file Telnet\-Server.\-c.

